from django.db import models
from django.contrib.auth.models import AbstractUser
import string,random

yzm=string.ascii_lowercase+string.ascii_uppercase+string.digits
sjm=''.join(random.choice(yzm)for _ in range(6))

'''
python manage.py makemigrations  创建迁移文件(把模型迁移到数据库)
python manage.py migrate  执行迁移文件，把模型迁移到Django数据库，成为一张数据表
'''


class Hmsx(AbstractUser):
    email = models.CharField(max_length=50)
    iphon = models.CharField(max_length=11)
    name = models.CharField(max_length=20,default='新用户'+sjm)
    activate = models.BooleanField(null=True)
